home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_global.over == 0)
- {
- if(Key.isDown(40) && nop1 == 0)
- {
- if(nop3 <= 15)
- {
- nop3 += 1;
- this._height += 4;
- this._width += 3;
- this._y += 5;
- }
- }
- else if(nop3 > 0)
- {
- nop3 -= 1;
- this._height -= 4;
- this._width -= 3;
- this._y -= 5;
- }
- if(_root.target_s == 1 && nop1 == 0 && key_push == 0 && nop3 == 0)
- {
- if(Key.isDown(32))
- {
- nop1 = 1;
- tmp = _Y;
- _root.mySound.attachSound("s_jump.wav");
- _root.mySound.start([0,1]);
- }
- }
- if(Key.isDown(32))
- {
- key_push = 1;
- }
- else
- {
- key_push = 0;
- }
- if(nop1 != 0)
- {
- t1 += 1.5;
- _Y = _Y - (20 - 1 * t1);
- if(_Y >= tmp)
- {
- _Y = tmp;
- t1 = 0;
- nop1 = 0;
- }
- }
- temp = _global.depth - 5;
- i = temp;
- while(i < temp + 7)
- {
- baku = "_root.bakuhatu" + i;
- if(hitTest(baku) && nop2 < 1)
- {
- nop2 = 11;
- _global.gauge += _global.damage_1;
- _global.gauge_b += _global.damage_1;
- _root.mySound.attachSound("s_damage.wav");
- _root.mySound.start([0,1]);
- }
- i++;
- }
- temp = _global.depth - 10;
- i = temp;
- while(i < temp + 12)
- {
- las = "_root.laser" + i;
- if(hitTest(las) && nop2 < 6)
- {
- nop2 = 11;
- _global.gauge += _global.damage_2;
- _global.gauge_b += _global.damage_2;
- _root.mySound.attachSound("s_damage.wav");
- _root.mySound.start([0,1]);
- }
- i++;
- }
- temp = _global.depth - 2;
- i = temp;
- while(i < temp + 3)
- {
- hado = "_root.hadou" + i;
- if(hitTest(hado) && nop3 < 10)
- {
- nop2 = 11;
- _global.gauge += _global.damage_3;
- _global.gauge_b += _global.damage_3;
- _root.mySound.attachSound("s_damage.wav");
- _root.mySound.start([0,1]);
- }
- i++;
- }
- if(nop2 > 0)
- {
- nop2 -= 1;
- }
- if(nop2 != 0)
- {
- _root.chara01.gotoAndStop("damage");
- }
- else if(nop1 == 1)
- {
- _root.chara01.gotoAndStop("jump");
- }
- else if(nop3 > 3)
- {
- _root.chara01.gotoAndStop("kaihi");
- }
- else
- {
- _root.chara01.gotoAndStop("run");
- }
- }
- }
-